home *** CD-ROM | disk | FTP | other *** search
- To assist the developpers, we provide tools for developping
- applications with Creative Voice System. These tools come in the
- form of driver, library functions and link module.
-
-
- CTV-MOD, is a Microsoft C's link module for supporting the 8-bit
- voice data without file header and data compression. The source
- code CTV-MOD.ASM is provided for developpers to tailor this module
- to any model they desire.
-
-
- Three global variables have to be declared in the main program.
- They are unsigned integer:
-
- a. io_addx: the card's selectable I/O address used.
- value range : 210, 220, 230, 240, 250 and 260
- factory default : 220 hex
-
- b. intr_num: the interrupt used for voice output.
- factory default : 7
-
- c. voice_status: the status word that indicates the status of voice
- output
-
-
- The functions provided are as follow:
-
-
- 1. Function : unint ctv_card_here()
- Description: check for the availabilities of the various
- music/sound features provided by Creative.
-
- The check is based on the IO address stored in
- the global variable io_addx which is defined in
- the application program.
- Entry : none
- Return : Music/sound features available as shown below :
- The high byte is always zero.
- The low byte is defined as :
- bit 0 : set if C/MS music available
- bit 1 : set if FM music available
- bit 2 : set if Creative voice available
-
- The type of Creative music/sound card can be
- determined from the return value. The
- GameBlaster card will return 1, the SoundBlaster
- will return 7 if the FM option is installed or 5
- if the FM option is not installed.
-
- A zero return value may be due to wrong IO
- address value in the global value io_addx.
-
- 2. Function : int ctv_detect()
- Description: detects the existence and functionality of the
- voice card and turn on the speaker by defualt.
- Entry : none
- Return : 0, sucessfully initialize
- 1, voice card fails
- 2, I/O read/write fails
- 3, interrupt for DMA fails
- Note : when a non-zero value is returned, it indicates
- an error, the program should abort.
-
- Before this function is called, the global
- variable io_addx and intr_num must be set to the
- correct value.
-
-
- 3. Function : void ctv_speaker(int on_off_flag)
- Description: turns on/off the speaker.
- Entry : the integer value on_off_flag set the status of
- the voice output speaker. A non-zero value turns
- the speaker on else turns it off.
- Entry : none
-
-
- 4. Function : int ctv_output(char far* buffer,
- unsigned int buffer_len,
- unsigned int sampling_rate)
- Description: outputs the voice
- Entry : buffer is a far pointer to the voice data.
- buffer_len is the length of the voice data.
- sampling_rate is the sampling rate used when the
- voice is recorded, range 6000 - 18000Hz.
- Exit : 0, sucessfull
- 1, error because currently there is voice being
- output or paused, voice_status is not zero.
- Note : while the voice being output, status_word is
- updated to a non-zero value. At the end,
- status_word is set to zero again.
-
-
- 5. Function : int ctv_pause()
- Description: puases the voice currently being output
- Entry : none
- Exit : 0, sucessfull
- 1, error, no voice is currently output
-
-
- 6. Function : int ctv_continue()
- Description: continues the paused voice output
- Entry : none
- Exit : 0, sucessfull
- 1, error, no voice output is currently pause
-
-
- 7. Function : int ctv_halt()
- Description: halts the voice currently being output
- Entry : none
- Exit : 0, sucessfull
- 1, error, no voice is currently output
-
-
- 8. Function : void ctv_uninstall()
- Description: turn off the speaker and stop the voice output,
- if any.
- Entry : none
- Exit : none
-
-
-